﻿using System;
using System.Collections.Generic;
using System.Text;
using TarreOA.TarreOAModels;
using TarreOA.TarreOADAL;

namespace TarreOA.TarreOABLL {
    public class AfficheInformAffixFiletbService {
        /// <summary>
        /// 保存公告通知上传附件信息
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="filePath"></param>
        /// <param name="ai_id"></param>
        /// <returns></returns>
        public int saveAffixFileInfo(string fileName, string filePath, int ai_id) {
            AfficheInformAffixFiletbDAO aiafDAO = new AfficheInformAffixFiletbDAO();
            return aiafDAO.saveAffixFileInfo(fileName, filePath, ai_id);
        }

        /// <summary>
        /// 根据附件编号删除附件信息
        /// </summary>
        /// <param name="afid"></param>
        /// <returns></returns>
        public int delAffixFileById(int afid) {
            AfficheInformAffixFiletbDAO aiafDAO = new AfficheInformAffixFiletbDAO();
            return aiafDAO.delAffixFileById(afid);
        }

        /// <summary>
        /// 根据公告通知编号查找此公告所有附件信息
        /// </summary>
        /// <param name="aiid"></param>
        /// <returns></returns>
        public List<AfficheInformAffixFiletb> findAllFileByAIid(int aiid) {
            AfficheInformAffixFiletbDAO aiafDAO = new AfficheInformAffixFiletbDAO();
            return aiafDAO.findAllFileByAIid(aiid);
        }
    }
}
